package org.utils.annotation;

import java.lang.annotation.Annotation;

import java.util.Map;
import static org.utils.fp.collection.CollectionFactory.*;

/**
 *
 * @author gus
 */
public class AnnotationManager
{
    private final static Map<Class, AnnotatedClassInfo> storage = newHashMap();

    public static <A extends Annotation> AnnotatedClassInfo<A> getAnnotatedClass(Class<?> annotatedClass)
    {
        if(!storage.containsKey(annotatedClass))
        {
            storage.put(annotatedClass, new AnnatatedClassImpl(annotatedClass));
        }
        return storage.get(annotatedClass);
    }
}
